package java2;

import java.util.Scanner;
import java.math.BigDecimal;

public class Q5 {

	public static void main(String[] args) {
		Scanner in = new Scanner(System.in);
		String a,b;
		while(in.hasNextLine()){
			a = in.nextLine();
		    b = in.nextLine();
			BigDecimal n1 = new BigDecimal(a);
			BigDecimal n2 = new BigDecimal(b);
			System.out.println(n1.add(n2));
			System.out.println(n1.multiply(n2)); 
		}
	}
}
